package com.czxy.changgou3.mapper;

import com.czxy.changgou3.pojo.Address;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

/**
 * @author zhangmengxiang1@itcast.cn
 * @version 1.0
 * @date 2020/5/4
 */
@org.apache.ibatis.annotations.Mapper
public interface AddressMapper extends Mapper<Address> {
    /**
     * 修改用户默认地址
     * @param userId
     * @param defaultValue
     */
    @Update("update tb_address set isdefault = #{defaultValue} where user_id = #{userId}")
    public void updateDefault(@Param("userId") Integer userId, @Param("defaultValue") int defaultValue);

}

